import request from '@/utils/request';

export async function getLatestTime(params) {
  return request('/api/indicator/latest', {
    method: 'get',
    params,
  });
}


export async function getChart(params) {
  return request('/api/indicator/chart', {
    method: 'get',
    params,
  });
}


export async function downloadHistory(param) {
  return request(`/api/indicator/downloadHistory?start=${param.start}&end=${param.end}&name=${param.name}&time=${new Date().getTime()}`,{
    responseType : 'blob'
  });
}
